/**
 * @file    errors.h
 * @author  Thomas Di'Meco and Matthieu Maugard
 * @brief   Errors helpers
 */

#ifndef ERRORS_H_
#define ERRORS_H_

#define NO_ERROR                            0  ///< No error
#define ERROR_INVALID_ARGUMENT              1  ///< Invalid argument error
#define ERROR_ASSEMBLY_FAILED               2  ///< Assembly failed error
#define ERROR_UNKNOWN_INSTRUCTION           3  ///< Unknown instruction error
#define ERROR_INVALID_MODE                  4  ///< Invalid instruction mode error
#define ERROR_INVALID_REGISTER              5  ///< Invalid register number error
#define ERROR_INVALID_MEMORY_ADDRESS        6  ///< Invalid memory address error
#define ERROR_INVALID_STACK_ADDRESS         7  ///< Invalid stack address error
#define ERROR_REACHED_MEMORY_LIMIT          8  ///< Reached memory limit error

/**
 * Get the string equivalent of an error id
 * @param errno The error id
 * @return The equivalent string error
 */
const char * error_string (int errno);

#endif /* ERRORS_H_ */
